#pragma once
#include "Tool.h"

typedef void (*EventFun)(const CParamMap& rkMap);

class CEventMgr
{
public:
	enum EventType
	{
		ET_NULL,
	};

	struct EventInfo
	{
		EventFun pFun;
		CParamMap kMap;
		EventInfo()
		{
			pFun = NULL;
			kMap.Clear();
		}
	};

public:
	CEventMgr(void);
	~CEventMgr(void);

	void AddEvent(EventType eType,EventFun pFunc,const CParamMap& rkMap = "");
	void Fire(EventType eType);
	void Clear();

private:
	map<EventType,vector<EventInfo>> m_akEvents;
};
